/**
 * 1. 必须在浏览器的控制台下执行下面的代码；
 * 2. 必须先访问：http://localhost:8080
 */

// const source = new EventSource("http://localhost:8080/sse");
const source = new EventSource('/sse');
source.onopen = () => console.log('Connected');
source.onerror = console.error;
source.onmessage = console.log;
